<?php
require_once(Yii::getPathOfAlias('application.extensions.smarty').DIRECTORY_SEPARATOR.'Smarty.class.php'); 

//smarty setting
define('SMARTY_VIEW_DIR', Yii::getPathOfAlias('application.views'));
define('SMARTY_LIFETIME', 30);
define('SMARTY_DLEFT', '<{');
define('SMARTY_DRIGHT', '}>');

class CSmarty extends Smarty
{
    public function init() {
        //$this->compile_check = true;
        
        //cache setting
        $this->caching = 2;
        $this->cache_lifetime = SMARTY_LIFETIME;
        $this->cache_dir = SMARTY_VIEW_DIR.DIRECTORY_SEPARATOR.'cache';
        
        //delimiter setting
        $this->left_delimiter  =  SMARTY_DLEFT;
        $this->right_delimiter =  SMARTY_DRIGHT;
        
        //dir setting
        $this->template_dir = SMARTY_VIEW_DIR;
        $this->compile_dir = SMARTY_VIEW_DIR.DIRECTORY_SEPARATOR.'template_c';
        $this->config_dir = SMARTY_VIEW_DIR.DIRECTORY_SEPARATOR.'configs';
        
    }
}

